This repository was archived by the owner on Feb 14, 2026. It is now read-only.
fix: pass environment variables to codex MCP process#29
Merged
bra1nDump merged 2 commits intoslopus:mainfrom Oct 10, 2025
Merged
fix: pass environment variables to codex MCP process#29bra1nDump merged 2 commits intoslopus:mainfrom
bra1nDump merged 2 commits intoslopus:mainfrom
Conversation
- Add env parameter to StdioClientTransport constructor calls - Fixes missing environment variable error when running happy codex - Ensures all environment variables are properly inherited by codex subprocess
Contributor
|
Thank you for your contribution, apologies for a long wait to merging this |
jasonnoahchoi
pushed a commit
to jasonnoahchoi/happy-cli
that referenced
this pull request
Dec 5, 2025
- Add env parameter to StdioClientTransport constructor calls - Fixes missing environment variable error when running happy codex - Ensures all environment variables are properly inherited by codex subprocess Co-authored-by: Kirill Dubovitskiy <kirill2003de@gmail.com>
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Pass environment variables to codex MCP process
Problem
When running
happy codexwith custom environment variables configured in~/.codex/config.toml, the command fails with "Missing environment variable: MY_ENV_KEY" error.Steps to Reproduce:
env_key = "MY_ENV_KEY"to~/.codex/config.tomlexport MY_ENV_KEY="some_value"happy codexSolution
The
StdioClientTransportconstructor was not passing environment variables to the codex subprocess. Added proper environment variable inheritance insrc/codex/codexMcpClient.ts.Code Changes:
Testing
happy codexnow starts without environment variable errorsType of Change
Fixes #[ISSUE_NUMBER] (if applicable)